package com.drinks.yiniang.entity.user.order;

import com.chad.library.adapter.base.BaseMultiItemQuickAdapter;
import com.chad.library.adapter.base.entity.MultiItemEntity;
import com.hansen.library.Constants;
import com.hansen.library.entity.BaseJson;

import java.util.List;

/**
 * 订单列表json
 *
 * @author han
 * @date 2019/9/7
 */
public class MyOrderJson extends BaseJson implements Cloneable {

    public static final int ITEM_TYPE_ORDER_TOP = 0x01;
    public static final int ITEM_TYPE_ORDER_MIDDLE = 0x02;
    public static final int ITEM_TYPE_ORDER_BOTTOM = 0x03;

    private MyOrderData data;

    public MyOrderData getData() {
        return data;
    }

    public void setData(MyOrderData data) {
        this.data = data;
    }

    @Override
    public Object clone() throws CloneNotSupportedException {
        MyOrderJson data = (MyOrderJson) super.clone();
        return data;
    }

    public static class MyOrderData implements Cloneable {
        //待支付订单列表
        private List<MyOrderList> wait_order;
        private List<MyOrderList> data;

        public List<MyOrderList> getWait_order() {
            return wait_order;
        }

        public void setWait_order(List<MyOrderList> wait_order) {
            this.wait_order = wait_order;
        }

        public List<MyOrderList> getData() {
            return data;
        }

        public void setData(List<MyOrderList> data) {
            this.data = data;
        }

        @Override
        public Object clone() throws CloneNotSupportedException {
            MyOrderData data = (MyOrderData) super.clone();
            return data;
        }
    }

    public static class MyOrderList implements MultiItemEntity, Cloneable {

        private int mItemType;
        //订单id
        private String id;
        //订单号
        private String order_no;
        //支付金额
        private String pay_amount;
        //订单状态 0待支付 1已支付 2已发货 3已送达 4交易完成 5已评价 6已取消 7退款仲裁（退款中） 9门店自提 10已退款 11拒绝退款 12缺货取消一品脱订单状态
        private String status;
        //数量
        private String goods_num;
        //是否门店自提, 1-是
        private String self_get;

        private List<MyOrderGoodsList> goods;
        //拆分临时存储goods
        private MyOrderGoodsList tempGoods;

        public void setItemType(int mItemType) {
            this.mItemType = mItemType;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getOrder_no() {
            return order_no;
        }

        public void setOrder_no(String order_no) {
            this.order_no = order_no;
        }

        public String getPay_amount() {
            return pay_amount;
        }

        public void setPay_amount(String pay_amount) {
            this.pay_amount = pay_amount;
        }

        public String getStatus() {
            return status;
        }

        public void setStatus(String status) {
            this.status = status;
        }

        public String getGoods_num() {
            return goods_num;
        }

        public void setGoods_num(String goods_num) {
            this.goods_num = goods_num;
        }

        public String getSelf_get() {
            return self_get;
        }

        public void setSelf_get(String self_get) {
            this.self_get = self_get;
        }

        public List<MyOrderGoodsList> getGoods() {
            return goods;
        }

        public void setGoods(List<MyOrderGoodsList> goods) {
            this.goods = goods;
        }

        public MyOrderGoodsList getTempGoods() {
            return tempGoods;
        }

        public void setTempGoods(MyOrderGoodsList tempGoods) {
            this.tempGoods = tempGoods;
        }

        @Override
        public int getItemType() {
            switch (mItemType) {
                case ITEM_TYPE_ORDER_TOP:
                case ITEM_TYPE_ORDER_MIDDLE:
                case ITEM_TYPE_ORDER_BOTTOM:
                    return mItemType;
                default:
                    return BaseMultiItemQuickAdapter.TYPE_NOT_FOUND;
            }
        }

        @Override
        public Object clone() throws CloneNotSupportedException {
            MyOrderList data = (MyOrderList) super.clone();
            return data;
        }
    }

    public static class MyOrderGoodsList implements Cloneable {
        //订单id
        private String order_id;
        private String goods_name;
        //支付金额
        private String pay_price;
        private String activity_amount;
        private String num;
        //赠送数量
        private String give_num;
        private String goods_sku_name;
        private String goods_sku_value;
        private String cover_url;
        private String recommend_reason;
        //容积
        private String single_capacity;

        public String getOrder_id() {
            return order_id;
        }

        public void setOrder_id(String order_id) {
            this.order_id = order_id;
        }

        public String getGoods_name() {
            return goods_name;
        }

        public void setGoods_name(String goods_name) {
            this.goods_name = goods_name;
        }

        public String getPay_price() {
            return pay_price;
        }

        public void setPay_price(String pay_price) {
            this.pay_price = pay_price;
        }

        public String getActivity_amount() {
            return activity_amount;
        }

        public void setActivity_amount(String activity_amount) {
            this.activity_amount = activity_amount;
        }

        public String getNum() {
            return num;
        }

        public void setNum(String num) {
            this.num = num;
        }

        public String getGive_num() {
            return give_num;
        }

        public void setGive_num(String give_num) {
            this.give_num = give_num;
        }

        public String getGoods_sku_name() {
            return goods_sku_name;
        }

        public void setGoods_sku_name(String goods_sku_name) {
            this.goods_sku_name = goods_sku_name;
        }

        public String getGoods_sku_value() {
            return goods_sku_value;
        }

        public void setGoods_sku_value(String goods_sku_value) {
            this.goods_sku_value = goods_sku_value;
        }

        public String getCover_url() {
            return cover_url;
        }

        public void setCover_url(String cover_url) {
            this.cover_url = cover_url;
        }

        public String getRecommend_reason() {
            return recommend_reason;
        }

        public void setRecommend_reason(String recommend_reason) {
            this.recommend_reason = recommend_reason;
        }

        public String getSingle_capacity() {
            return single_capacity;
        }

        public void setSingle_capacity(String single_capacity) {
            this.single_capacity = single_capacity;
        }

        @Override
        public Object clone() throws CloneNotSupportedException {
            MyOrderList data = (MyOrderList) super.clone();
            return data;
        }
    }
}
